package com.allenkerr.vo;

import com.allenkerr.util.SearchParamUtils;
import org.apache.commons.collections4.MapUtils;

import java.util.Map;

/**
 * Created by 小柯 on 17/9/7.
 */
public class BookSearchParams {

    private String id;
    private String title;
    private String author;
    private String releaseDate;

    public BookSearchParams(Map<String, String> map) {
        if (MapUtils.isEmpty(map)) {
            return;
        }
        this.id = SearchParamUtils.getStringParam(map, "id");
        this.title = SearchParamUtils.getStringParam(map, "title");
        this.author = SearchParamUtils.getStringParam(map, "author");
        this.releaseDate = SearchParamUtils.getStringParam(map, "release_date");
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public String getReleaseDate() {
        return releaseDate;
    }

    public void setReleaseDate(String releaseDate) {
        this.releaseDate = releaseDate;
    }
}
